<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<link href="<c:url value="/resources/bootstrap/2.3.2/css/bootstrap.css" />" rel="stylesheet">
<link href="<c:url value="/resources/bootstrap/2.3.2/css/bootstrap-responsive.css" />" rel="stylesheet">

<title>模拟订单处理</title>
<style>
 	input[type='text'],input[type='password']{
		height: auto;
    }

</style>
</head>

<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<h2>订单处理</h2>
			<hr>
			
			<div>
				这里只提供模拟提交，具体内容都是测试数据，写死固定，使用ajax方式提交json串。
			</div>
			<div>
			<button type="button" id="btn1" class="btn btn-success">准备配送</button>
			<button type="button" id="btn2" class="btn btn-success">订单完成</button>
			<button type="button" id="btn3" class="btn btn-success">取消订单</button>
			
			</div>
		</div>
	</div>
	<!--/row-->
</body>

<script src="<c:url value="/resources/jquery/1.9.1/jquery.min.js" />"></script>
<script src="<c:url value="/resources/bootstrap/2.3.2/js/bootstrap.min.js" />"></script>
<script type="text/javascript" src="<c:url value="/resources/bootstrap/bootstrap-validation.js" />"></script>
<script type="text/javascript">
	$(document).ready(function(){
	
		$("#btn1").click(function(){
			xxx(1);
		})
		$("#btn2").click(function(){
			xxx(2);
		})
		$("#btn3").click(function(){
			xxx(3);
		})
	})
	
	function xxx(status){
		$.ajax({
			url:'<c:url value="/api/book/seller/order" />?orderId=1&status='+status,
			type:'post',
			dataType:'json',
			contentType : 'application/json',  
			data:{status:status},
			success:function(data){
				console.log(data);
			}
		})
	}
	
</script>